﻿public class GlobalMembersMain_menu
{
	// ****************************************************************************
	// * Punch And Kick -- a simple 2D Fighting Game.
	// *
	// * Copyright (C) 2013 by
	// * Liu Chao
	// *
	// * This file is part of the Punch And Kick project, and may only be used,
	// * modified, and distributed under the terms of the GPLv2.
	// *
	// * (GPLv2 is abbreviation of GNU General Public License Version 2)
	// *
	// * By continuing to use, modify, or distribute this file you indicate that you
	// * have read the license and understand and accept it fully.
	// *
	// * The Punch And Kick project is distributed in the hope that it will be
	// * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of 
	// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GPL v2 for
	// * more details.
	// *
	// * You should have received a copy of the GPLv2 along with this file. It is
	// * usually in the LICENSE.TXT file, If not, see <http://www.gnu.org/licenses/>.
	// * **************************************************************************

	// ****************************************************************************
	// * Punch And Kick -- 一个普通的2D格斗游戏
	// *
	// * 版权所有 (C) 2013 归属于
	// * 刘超
	// *
	// * 这个文件是 Punch And Kick 项目的一部分，并且只可以根据GPLv2许可协议来使用、
	// * 更改和发布。
	// *
	// * (GPLv2 是 GNU通用公共许可证第二版 的英文缩写)
	// *
	// * 继续使用、修改或发布本文件，表明您已经阅读并完全理解和接受这个许可协议。
	// *
	// * Punch And Kick 项目是基于技术交流目的而加以散布的，但不负任何担保责任，例
	// * 如：稳定性、可玩性、趣味性等的担保，甚至没有适销性或特定用途的隐含担保，详
	// * 情请参照GPLv2许可协议。
	// *
	// * 您应已收到附随于本文件的GPLv2许可协议的副本，它通常在LICENSE.TXT文件中，如果
	// * 没有，请查看：<http://www.gnu.org/licenses/>.
	// * **************************************************************************

	// 游戏主菜单



	//#define ITEM_BOX_HEIGHT
	////C++ TO C# CONVERTER NOTE: The following #define macro was replaced in-line:
	////ORIGINAL LINE: #define LOGOBTN_SIZE Size(116,116)
	//#define LOGOBTN_SIZE

	////C++ TO C# CONVERTER NOTE: The following #define macro was replaced in-line:
	////ORIGINAL LINE: #define TEXT_SINGLE_GAME L"单人游戏"
	//#define TEXT_SINGLE_GAME
	////C++ TO C# CONVERTER NOTE: The following #define macro was replaced in-line:
	////ORIGINAL LINE: #define TEXT_NETWORK_BATTLE L"联机对战"
	//#define TEXT_NETWORK_BATTLE
	////C++ TO C# CONVERTER NOTE: The following #define macro was replaced in-line:
	////ORIGINAL LINE: #define TEXT_OPTIONS L"选项"
	//#define TEXT_OPTIONS
	////C++ TO C# CONVERTER NOTE: The following #define macro was replaced in-line:
	////ORIGINAL LINE: #define TEXT_HELP L"帮助"
	//#define TEXT_HELP
	////C++ TO C# CONVERTER NOTE: The following #define macro was replaced in-line:
	////ORIGINAL LINE: #define TEXT_QUIT L"退出"
	//#define TEXT_QUIT

	////C++ TO C# CONVERTER NOTE: The following #define macro was replaced in-line:
	////ORIGINAL LINE: #define TEXT_2V2_GAME L"2v2对战"
	//#define TEXT_2V2_GAME
	////C++ TO C# CONVERTER NOTE: The following #define macro was replaced in-line:
	////ORIGINAL LINE: #define TEXT_SCUFFLE_GAME L"4人混战"
	//#define TEXT_SCUFFLE_GAME

	//#define TEXT_SET_KEYBOARD_AlternateDefinition1
	////C++ TO C# CONVERTER NOTE: The following #define macro was replaced in-line:
	////ORIGINAL LINE: #define TEXT_SET_KEYBOARD L"键位设置"
	//#define TEXT_SET_KEYBOARD
	////C++ TO C# CONVERTER NOTE: The following #define macro was replaced in-line:
	////ORIGINAL LINE: #define TEXT_WINDOWED L"窗口模式"
	//#define TEXT_WINDOWED
	////C++ TO C# CONVERTER NOTE: The following #define macro was replaced in-line:
	////ORIGINAL LINE: #define TEXT_ON L"开"
	//#define TEXT_ON
	////C++ TO C# CONVERTER NOTE: The following #define macro was replaced in-line:
	////ORIGINAL LINE: #define TEXT_OFF L"关"
	//#define TEXT_OFF

	////C++ TO C# CONVERTER NOTE: The following #define macro was replaced in-line:
	////ORIGINAL LINE: #define TEXT_USAGE L"操作方法"
	//#define TEXT_USAGE
	////C++ TO C# CONVERTER NOTE: The following #define macro was replaced in-line:
	////ORIGINAL LINE: #define TEXT_ABOUT L"关于本游戏"
	//#define TEXT_ABOUT
	////C++ TO C# CONVERTER NOTE: The following #define macro was replaced in-line:
	////ORIGINAL LINE: #define TEXT_LICENSE L"许可协议"
	//#define TEXT_LICENSE
	////C++ TO C# CONVERTER NOTE: The following #define macro was replaced in-line:
	////ORIGINAL LINE: #define TEXT_JOINUS L"加入我们"
	//#define TEXT_JOINUS

	////C++ TO C# CONVERTER NOTE: The following #define macro was replaced in-line:
	////ORIGINAL LINE: #define TEXT_QUIT_TIP_TEXT L"你确定要退出游戏？"
	//#define TEXT_QUIT_TIP_TEXT
	////C++ TO C# CONVERTER NOTE: The following #define macro was replaced in-line:
	////ORIGINAL LINE: #define TEXT_QUIT_TIP_TITLE L"提示"
	//#define TEXT_QUIT_TIP_TITLE

	////C++ TO C# CONVERTER NOTE: The following #define macro was replaced in-line:
	////ORIGINAL LINE: #define SIZE_MAIN_MENU_BOX Size(150,180)
	//#define SIZE_MAIN_MENU_BOX
	////C++ TO C# CONVERTER NOTE: The following #define macro was replaced in-line:
	////ORIGINAL LINE: #define SIZE_GAME_MENU_BOX Size(150,75)
	//#define SIZE_GAME_MENU_BOX
	////C++ TO C# CONVERTER NOTE: The following #define macro was replaced in-line:
	////ORIGINAL LINE: #define SIZE_HELP_MENU_BOX Size(150,145)
	//#define SIZE_HELP_MENU_BOX
	////C++ TO C# CONVERTER NOTE: The following #define macro was replaced in-line:
	////ORIGINAL LINE: #define SIZE_OPTIONS_MENU_BOX Size(150,75)
	//#define SIZE_OPTIONS_MENU_BOX

	////C++ TO C# CONVERTER NOTE: The following #define macro was replaced in-line:
	////ORIGINAL LINE: #define COLOR_RED {255,78,0}
	//#define COLOR_RED
	////C++ TO C# CONVERTER NOTE: The following #define macro was replaced in-line:
	////ORIGINAL LINE: #define COLOR_ORANGE {255,197,2}
	//#define COLOR_ORANGE
	////C++ TO C# CONVERTER NOTE: The following #define macro was replaced in-line:
	////ORIGINAL LINE: #define COLOR_GREEN {76,133,2}
	//#define COLOR_GREEN
	////C++ TO C# CONVERTER NOTE: The following #define macro was replaced in-line:
	////ORIGINAL LINE: #define COLOR_BLUE {0,156,255}
	//#define COLOR_BLUE
	////C++ TO C# CONVERTER NOTE: The following #define macro was replaced in-line:
	////ORIGINAL LINE: #define COLOR_PURPLE {161,159,234}
	//#define COLOR_PURPLE

	//#define TOTAL_COLOR_NUM

	//* 菜单配色方案 1 
	internal static LCUI_RGB_[] menu_cs1 = { new LCUI_RGB_(255, 78, 0), new LCUI_RGB_(255, 197, 2), new LCUI_RGB_(76, 133, 2), new LCUI_RGB_(0, 156, 255), new LCUI_RGB_(161, 159, 234) };

	//* 菜单配色方案 2 
	internal static LCUI_RGB_[] menu_cs2 = { new LCUI_RGB_(76, 133, 2), new LCUI_RGB_(0, 156, 255), new LCUI_RGB_(161, 159, 234), new LCUI_RGB_(255, 78, 0), new LCUI_RGB_(255, 197, 2) };

	//* 菜单配色方案 3 
	internal static LCUI_RGB_[] menu_cs3 = { new LCUI_RGB_(161, 159, 234), new LCUI_RGB_(255, 78, 0), new LCUI_RGB_(255, 197, 2), new LCUI_RGB_(76, 133, 2), new LCUI_RGB_(0, 156, 255) };

    internal static LCUI_Widget_ main_ui_box;
    internal static LCUI_Widget_ main_menu_box;
    internal static LCUI_Widget_ game_menu_box;
    internal static LCUI_Widget_ help_menu_box;
    internal static LCUI_Widget_ options_menu_box;
    internal static LCUI_Widget_ footer_box;
    internal static LCUI_Widget_[] front_wave = new LCUI_Widget_[2];
    internal static LCUI_Widget_[] back_wave = new LCUI_Widget_[2];
    internal static LCUI_Widget_ copyright_text;
    internal static LCUI_Graph_[] img_res = new LCUI_Graph_[9];
    //C++ TO C# CONVERTER NOTE: This was formerly a static local variable declaration (not allowed in C#):
    //private static LCUI_Pos_[] wave_offset_pos = { new LCUI_Pos_(0, -DefineConstantsMain_menu.ITEM_BOX_HEIGHT), new LCUI_Pos_(0, -DefineConstantsMain_menu.ITEM_BOX_HEIGHT) };

    //	internal static void UIEffect_MoveWave1(System.IntPtr arg)
    //	{
    //		LCUI_Pos_ offset_pos = new LCUI_Pos_();
    //	//C++ TO C# CONVERTER NOTE: This static local variable declaration (not allowed in C#) has been moved just prior to the method:
    //	//	static LCUI_Pos wave_offset_pos[2] = { {0,-DefineConstantsMain_menu.ITEM_BOX_HEIGHT}, {0,-DefineConstantsMain_menu.ITEM_BOX_HEIGHT} };

    //		if(wave_offset_pos[0].x == 0)
    //		{
    //			wave_offset_pos[1].x = Graph_GetSize(img_res[1]).w;
    //		}
    //		--wave_offset_pos[0].x;
    //		--wave_offset_pos[1].x;
    //		if(wave_offset_pos[0].x <= -Graph_GetSize(img_res[1]).w)
    //		{
    //			wave_offset_pos[0].x = Graph_GetSize(img_res[1]).w;
    //		}
    //		if(wave_offset_pos[1].x <= -Graph_GetSize(img_res[1]).w)
    //		{
    //			wave_offset_pos[1].x = Graph_GetSize(img_res[1]).w;
    //		}
    //		offset_pos.x = wave_offset_pos[0].x;
    //		offset_pos.y = wave_offset_pos[0].y;
    //		Widget_SetAlign(front_wave[0], ALIGN_TYPE_.ALIGN_BOTTOM_LEFT, offset_pos);
    //		offset_pos.x = wave_offset_pos[1].x;
    //		offset_pos.y = wave_offset_pos[1].y;
    //		Widget_SetAlign(front_wave[1], ALIGN_TYPE_.ALIGN_BOTTOM_LEFT, offset_pos);
    //	}
    ////C++ TO C# CONVERTER NOTE: This was formerly a static local variable declaration (not allowed in C#):
    //private static LCUI_Pos_[] wave_offset_pos = { new LCUI_Pos_(0, -DefineConstantsMain_menu.ITEM_BOX_HEIGHT), new LCUI_Pos_(0, -DefineConstantsMain_menu.ITEM_BOX_HEIGHT) };

    //	internal static void UIEffect_MoveWave2(IntPtr arg)
    //	{
    //		LCUI_Pos_ offset_pos = new LCUI_Pos_();
    //	//C++ TO C# CONVERTER NOTE: This static local variable declaration (not allowed in C#) has been moved just prior to the method:
    //	//	static LCUI_Pos wave_offset_pos[2] = { {0,-DefineConstantsMain_menu.ITEM_BOX_HEIGHT}, {0,-DefineConstantsMain_menu.ITEM_BOX_HEIGHT} };

    //		if(wave_offset_pos[0].x == 0)
    //		{
    //			wave_offset_pos[1].x = Graph_GetSize(img_res[2]).w;
    //		}
    //		--wave_offset_pos[0].x;
    //		--wave_offset_pos[1].x;
    //		if(wave_offset_pos[0].x <= -Graph_GetSize(img_res[2]).w)
    //		{
    //			wave_offset_pos[0].x = Graph_GetSize(img_res[2]).w;
    //		}
    //		if(wave_offset_pos[1].x <= -Graph_GetSize(img_res[2]).w)
    //		{
    //			wave_offset_pos[1].x = Graph_GetSize(img_res[2]).w;
    //		}
    //		offset_pos.x = wave_offset_pos[0].x;
    //		offset_pos.y = wave_offset_pos[0].y;
    //		Widget_SetAlign(back_wave[0], ALIGN_TYPE_.ALIGN_BOTTOM_LEFT, offset_pos);
    //		offset_pos.x = wave_offset_pos[1].x;
    //		offset_pos.y = wave_offset_pos[1].y;
    //		Widget_SetAlign(back_wave[1], ALIGN_TYPE_.ALIGN_BOTTOM_LEFT, offset_pos);
    //	}

    //	public static void Game_LoadMainUIRes()
    //	{
    //		GameGraphRes_GetGraph(DefineConstantsMain_menu.MAIN_RES, "main-menu-bg", img_res[(int)RES_ID.RES_MAIN_BG]);
    //		GameGraphRes_GetGraph(DefineConstantsMain_menu.MAIN_RES, "front-wave-img", img_res[(int)RES_ID.RES_FRONT_WAVE]);
    //		GameGraphRes_GetGraph(DefineConstantsMain_menu.MAIN_RES, "back-wave-img", img_res[(int)RES_ID.RES_BACK_WAVE]);
    //	}

    //private static void keyboard_tip_box_on_drag( LCUI_Widget_ widget, LCUI_WidgetEvent event_)
    //{
    // 在开始拖动时 
    //if(event_.drag.first_click)
    //{
    //	Widget_SetAlign(widget, ALIGN_TYPE_.ALIGN_NONE, Pos(0,0));
    //	Widget_Front(widget); // 前置部件显示 
    //	Widget_Refresh(widget); // 刷新该部件区域的图形 
    //}
    //if(event_.drag.new_pos.x < 0)
    //{
    //	event_.drag.new_pos.x = 0;
    //}
    //if(event_.drag.new_pos.x + widget.size.w > DefineConstantsMain_menu.GAME_SCREEN_WIDTH)
    //{
    //	event_.drag.new_pos.x = DefineConstantsMain_menu.GAME_SCREEN_WIDTH - widget.size.w;
    //}
    //if(event_.drag.new_pos.y < 0)
    //{
    //	event_.drag.new_pos.y = 0;
    //}
    //if(event_.drag.new_pos.y + widget.size.h > DefineConstantsMain_menu.GAME_SCREEN_HEIGHT)
    //{
    //	event_.drag.new_pos.y = DefineConstantsMain_menu.GAME_SCREEN_HEIGHT - widget.size.h;
    //}
    //Widget_Move(widget, event_.drag.new_pos);


    //private static void keyboard_tip_box_on_clicked( LCUI_Widget_ widget, LCUI_WidgetEvent event_)
    //{
    //	Widget_Front(widget);
    //	Widget_Refresh(widget);
    //}

    ////* 在退出按钮被点击时 
    //internal static void btn_quit_clicked(LCUI_Widget_ widget, ref LCUI_WidgetEvent unused)
    //{
    //	int ret;
    //	ret = LCUI_MessageBoxW(MB_ICON_WARNING, "你确定要退出游戏？", "提示", MB_BTN_YESNO);
    //	if(ret == MB_BTN_IS_YES)
    //	{
    //		LCUI_MainLoop_Quit(null);
    //	}
    //}

    //internal static void btn_usage_clicked(LCUI_Widget_ widget, ref LCUI_WidgetEvent unused)
    //{
    //	GameWindow_InitUsageWindow();
    //	GameWindow_ShowUsageWindow();
    //}

    //internal static void btn_about_clicked(LCUI_Widget_ widget, ref LCUI_WidgetEvent unused)
    //{
    //	GameWindow_InitAboutWindow();
    //	GameWindow_ShowAboutWindow();
    //}

    //internal static void btn_license_clicked(LCUI_Widget_ widget, ref LCUI_WidgetEvent unused)
    //{
    //	GameWindow_InitLicenseWindow();
    //	GameWindow_ShowLicenseWindow();
    //}

    //internal static void btn_joinus_clicked(LCUI_Widget_ widget, ref LCUI_WidgetEvent unused)
    //{
    //	GameWindow_InitJoinUsWindow();
    //	GameWindow_ShowJoinUsWindow();
    //}

    //internal static void btn_2v2_mode_clicked(LCUI_Widget_ widget, ref LCUI_WidgetEvent unused)
    //{
    //	LCUI_MessageBoxW(MB_ICON_WARNING, "此对战模式未加入。", "提示", MB_BTN_OK);
    //}

    //internal static void btn_network_battle_clicked(LCUI_Widget_ widget, ref LCUI_WidgetEvent unused)
    //{
    //	LCUI_MessageBoxW(MB_ICON_WARNING, "此功能暂未开发。", "提示", MB_BTN_OK);
    //}

    //internal static void scuffle_game_btn_clicked(LCUI_Widget_ widget, ref LCUI_WidgetEvent unused)
    //{
    //	Game_InitRoleSelectBox();
    //	Game_ShowRoleSelectBox();
    //}

    //internal static void btn_setkey_clicked(LCUI_Widget_ widget, ref LCUI_WidgetEvent unused)
    //{
    //	GameWindow_InitSetKeyboardWindow();
    //	GameWindow_ShowSetKeyboardWindow();
    //}

    //internal static void btn_switch_video_mode_clicked(LCUI_Widget_ widget, ref LCUI_WidgetEvent unused)
    //{
    //	int mode;
    //	char[] str_buff = new char[32];
    //	if (GameConfig_IsWindowed() != null)
    //	{
    //		GameConfig_SetWindowed(DefineConstantsMain_menu.FALSE);
    //		GameConfig_Save();
    //		mode = DefineConstantsMain_menu.LCUI_INIT_MODE_FULLSCREEN;
    //		str_buff = "窗口模式" ": " "关";
    //	}
    //	else
    //	{
    //		GameConfig_SetWindowed(DefineConstantsMain_menu.TRUE);
    //		GameConfig_Save();
    //		mode = DefineConstantsMain_menu.LCUI_INIT_MODE_WINDOW;
    //		str_buff = "窗口模式" ": " "开";
    //	}

    //	// 如果该部件类型不是菜单按钮，则查找是菜单按钮类型的父级部件 
    //	if(0 != _LCUIString_Cmp(widget.type_name, DefineConstantsMain_menu.WIDGET_TYPE_GAME_MENU_BUTTON))
    //	{
    //		widget = Widget_GetParent(widget, DefineConstantsMain_menu.WIDGET_TYPE_GAME_MENU_BUTTON);
    //	}
    //	if (widget != null)
    //	{
    //		GameMenuBtn_SetTextW(widget, str_buff);
    //	}
    //	LCUIScreen_SetMode(DefineConstantsMain_menu.GAME_SCREEN_WIDTH, DefineConstantsMain_menu.GAME_SCREEN_HEIGHT, mode);
    //}

    ////* 初始化主菜单 
    //internal static void Game_InitMainMenu()
    //{
    //	char[] str_buff = new char[32];
    //	LCUI_Widget_ btn_single_game;
    //	LCUI_Widget_ btn_help;
    //	LCUI_Widget_ btn_network_battle;
    //	LCUI_Widget_ btn_options;
    //	LCUI_Widget_ btn_quit;
    //	LCUI_Widget_ btn_2v2_mode;
    //	LCUI_Widget_ btn_scuffle_mode;
    //	LCUI_Widget_ btn_setkey;
    //	LCUI_Widget_ btn_switch_video_mode;
    //	LCUI_Widget_ btn_usage;
    //	LCUI_Widget_ btn_about;
    //	LCUI_Widget_ btn_license;
    //	LCUI_Widget_ btn_joinus;

    //	// 创建几个游戏菜单 
    //	main_menu_box = GameMenu_New();
    //	game_menu_box = GameMenu_New();
    //	help_menu_box = GameMenu_New();
    //	options_menu_box = GameMenu_New();
    //	// 将这些菜单放入主界面框里 
    //	Widget_Container_Add(main_ui_box, main_menu_box);
    //	Widget_Container_Add(main_ui_box, game_menu_box);
    //	Widget_Container_Add(main_ui_box, help_menu_box);
    //	Widget_Container_Add(main_ui_box, options_menu_box);
    //	// 设置主菜单的位置 
    //	Widget_SetAlign(main_menu_box, ALIGN_TYPE_.ALIGN_MIDDLE_LEFT, Pos(50,0));
    //	// 为这些菜单设置配色方案 
    //	GameMenu_SetColorScheme(main_menu_box, menu_cs1, DefineConstantsMain_menu.TOTAL_COLOR_NUM);
    //	GameMenu_SetColorScheme(game_menu_box, menu_cs2, DefineConstantsMain_menu.TOTAL_COLOR_NUM);
    //	GameMenu_SetColorScheme(help_menu_box, menu_cs1, DefineConstantsMain_menu.TOTAL_COLOR_NUM);
    //	GameMenu_SetColorScheme(options_menu_box, menu_cs3, DefineConstantsMain_menu.TOTAL_COLOR_NUM);
    //	// 为菜单创建按钮 
    //	btn_single_game = GameMenu_NewButtonW(main_menu_box, "单人游戏");
    //	btn_network_battle = GameMenu_NewButtonW(main_menu_box, "联机对战");

    //	btn_2v2_mode = GameMenu_NewButtonW(game_menu_box, "2v2对战");
    //	btn_scuffle_mode = GameMenu_NewButtonW(game_menu_box, "4人混战");

    //	btn_options = GameMenu_NewButtonW(main_menu_box, "选项");
    //	btn_help = GameMenu_NewButtonW(main_menu_box, "帮助");
    //	btn_quit = GameMenu_NewButtonW(main_menu_box, "退出");

    //	btn_usage = GameMenu_NewButtonW(help_menu_box, "操作方法");
    //	btn_about = GameMenu_NewButtonW(help_menu_box, "关于本游戏");
    //	btn_license = GameMenu_NewButtonW(help_menu_box, "许可协议");
    //	btn_joinus = GameMenu_NewButtonW(help_menu_box, "加入我们");

    //	btn_setkey = GameMenu_NewButtonW(options_menu_box, "键位设置");
    //	// 根据游戏的配置数据，判断是否启用窗口模式，并让按钮上显示相应文字 
    //	if (GameConfig_IsWindowed() != null)
    //	{
    //		str_buff = "窗口模式" ": " "开";
    //	}
    //	else
    //	{
    //		str_buff = "窗口模式" ": " "关";
    //	}
    //	btn_switch_video_mode = GameMenu_NewButtonW(options_menu_box, str_buff);
    //	// 为菜单按钮关联CLICKED事件，以在按钮被点击时进行相应 
    //	Widget_ConnectEvent(btn_2v2_mode, EVENT_CLICKED, btn_2v2_mode_clicked);
    //	Widget_ConnectEvent(btn_scuffle_mode, EVENT_CLICKED, scuffle_game_btn_clicked);
    //	Widget_ConnectEvent(btn_network_battle, EVENT_CLICKED, btn_network_battle_clicked);
    //	Widget_ConnectEvent(btn_setkey, EVENT_CLICKED, btn_setkey_clicked);
    //	Widget_ConnectEvent(btn_switch_video_mode, EVENT_CLICKED, btn_switch_video_mode_clicked);
    //	Widget_ConnectEvent(btn_quit, EVENT_CLICKED, btn_quit_clicked);
    //	Widget_ConnectEvent(btn_usage, EVENT_CLICKED, btn_usage_clicked);
    //	Widget_ConnectEvent(btn_about, EVENT_CLICKED, btn_about_clicked);
    //	Widget_ConnectEvent(btn_license, EVENT_CLICKED, btn_license_clicked);
    //	Widget_ConnectEvent(btn_joinus, EVENT_CLICKED, btn_joinus_clicked);
    //	// 设置一些子菜单 
    //	GameMenu_SetChildMenu(main_menu_box, btn_single_game, game_menu_box);
    //	GameMenu_SetChildMenu(main_menu_box, btn_help, help_menu_box);
    //	GameMenu_SetChildMenu(main_menu_box, btn_options, options_menu_box);
    //	// 调整各个菜单的尺寸 
    //	Widget_Resize(main_menu_box, Size(150,180));
    //	Widget_Resize(game_menu_box, Size(150,75));
    //	Widget_Resize(help_menu_box, Size(150,145));
    //	Widget_Resize(options_menu_box, Size(150,75));
    //}

    //internal static void Game_ShowMainMenu()
    //{
    //	Widget_Show(main_menu_box);
    //}

    ////* 初始化主界面 
    //public static void Game_InitMainUI()
    //{
    //	Game_LoadMainUIRes();
    //	// 创建所需的部件 
    //	main_ui_box = Widget_New(null);

    //	footer_box = Widget_New(null);
    //	front_wave[0] = Widget_New(null);
    //	front_wave[1] = Widget_New(null);
    //	back_wave[0] = Widget_New(null);
    //	back_wave[1] = Widget_New(null);
    //	copyright_text = Widget_New("label");

    //	Widget_SetSize(main_ui_box, "100%", "100%");
    //	Widget_SetAlign(main_ui_box, ALIGN_TYPE_.ALIGN_MIDDLE_CENTER, Pos(0,0));
    //	Widget_SetAlpha(main_ui_box, 0);

    //	// 主界面显示在普通部件的底层 
    //	Widget_SetZIndex(main_ui_box, -1);
    //	Widget_Container_Add(main_ui_box, footer_box);
    //	Widget_SetHeight(footer_box, DefineConstantsMain_menu.ITEM_BOX_HEIGHT);
    //	Widget_SetSize(footer_box, "100%", null);
    //	Widget_SetAlign(footer_box, ALIGN_TYPE_.ALIGN_BOTTOM_CENTER, Pos(0,0));
    //	Widget_SetBackgroundColor(footer_box, RGB(255,255,255));
    //	Widget_SetBackgroundTransparent (footer_box, DefineConstantsMain_menu.FALSE);

    //	Widget_Container_Add(main_ui_box, front_wave[0]);
    //	Widget_Container_Add(main_ui_box, front_wave[1]);
    //	Widget_Resize(front_wave[0], Graph_GetSize(img_res[(int)RES_ID.RES_FRONT_WAVE]));
    //	Widget_Resize(front_wave[1], Graph_GetSize(img_res[(int)RES_ID.RES_FRONT_WAVE]));
    //	Widget_SetBackgroundImage(front_wave[0], img_res[(int)RES_ID.RES_FRONT_WAVE]);
    //	Widget_SetBackgroundImage(front_wave[1], img_res[(int)RES_ID.RES_FRONT_WAVE]);
    //	Widget_SetBackgroundLayout(front_wave[0], LAYOUT_CENTER);
    //	Widget_SetBackgroundLayout(front_wave[1], LAYOUT_CENTER);
    //	Widget_SetAlign(front_wave[0], ALIGN_TYPE_.ALIGN_BOTTOM_LEFT, Pos(0,-DefineConstantsMain_menu.ITEM_BOX_HEIGHT));
    //	Widget_SetAlign(front_wave[1], ALIGN_TYPE_.ALIGN_BOTTOM_LEFT, Pos(Graph_GetSize(img_res[(int)RES_ID.RES_FRONT_WAVE]).w, -DefineConstantsMain_menu.ITEM_BOX_HEIGHT));

    //	Widget_Container_Add(main_ui_box, back_wave[0]);
    //	Widget_Container_Add(main_ui_box, back_wave[1]);
    //	Widget_Resize(back_wave[0], Graph_GetSize(img_res[(int)RES_ID.RES_BACK_WAVE]));
    //	Widget_Resize(back_wave[1], Graph_GetSize(img_res[(int)RES_ID.RES_BACK_WAVE]));
    //	Widget_SetBackgroundImage(back_wave[0], img_res[(int)RES_ID.RES_BACK_WAVE]);
    //	Widget_SetBackgroundImage(back_wave[1], img_res[(int)RES_ID.RES_BACK_WAVE]);
    //	Widget_SetBackgroundLayout(back_wave[0], LAYOUT_CENTER);
    //	Widget_SetBackgroundLayout(back_wave[1], LAYOUT_CENTER);
    //	Widget_SetAlign(back_wave[0], ALIGN_TYPE_.ALIGN_BOTTOM_LEFT, Pos(0,-DefineConstantsMain_menu.ITEM_BOX_HEIGHT));
    //	Widget_SetAlign(back_wave[1], ALIGN_TYPE_.ALIGN_BOTTOM_LEFT, Pos(Graph_GetSize(img_res[(int)RES_ID.RES_BACK_WAVE]).w, -DefineConstantsMain_menu.ITEM_BOX_HEIGHT));

    //	Widget_Container_Add(main_ui_box, copyright_text);
    //	Label_TextW(copyright_text, "<size=16px>Powered By LCUI</size>");
    //	Widget_SetAlign(copyright_text, ALIGN_TYPE_.ALIGN_BOTTOM_CENTER, Pos(0,-30));

    //	Game_InitMainMenu();
    //	Game_ShowMainMenu();

    //	Widget_Show(front_wave[0]);
    //	Widget_Show(front_wave[1]);
    //	Widget_Show(back_wave[0]);
    //	Widget_Show(back_wave[1]);
    //	Widget_Show(footer_box);
    //	Widget_Show(copyright_text);
    //	Widget_Show(main_ui_box);

    //	// 设置两个定时器，用于定时改变波浪的位置，以实现波浪的移动效果 
    //	LCUITimer_Set(20, UIEffect_MoveWave1, null, DefineConstantsMain_menu.TRUE);
    //	LCUITimer_Set(60, UIEffect_MoveWave2, null, DefineConstantsMain_menu.TRUE);
    //}

    ////* 显示主菜单 
    //public static void Game_ShowMainUI()
    //{
    //	byte alpha;

    //	Widget_Show(main_ui_box);
    //	// 以淡入的效果显示菜单 
    //	for(alpha =0; alpha<240; alpha+=20)
    //	{
    //		Widget_SetAlpha(main_ui_box, alpha);
    //		LCUI_MSleep(25);
    //	}
    //	Widget_SetAlpha(main_ui_box, 255);
    //}

    public static LCUI_Widget_ Game_GetMainUI()
    {
        return main_ui_box;
    }

    //* 隐藏主菜单 
    //public static void Game_HideMainUI()
    //{
    //	byte alpha;
    //	// 以淡出的效果显示菜单 
    //	for(alpha =240; alpha>0; alpha-=20)
    //	{
    //		Widget_SetAlpha(main_ui_box, alpha);
    //		LCUI_MSleep(25);
    //	}
    //	Widget_SetAlpha(main_ui_box, 0);
    //	Widget_Hide(main_ui_box);
    //}

    //* 销毁主菜单 
    //public static void Game_DestroyMainMenu()
    //{

    //}
}

public enum RES_ID: int
{
	RES_MAIN_BG,
	RES_FRONT_WAVE,
	RES_BACK_WAVE,
	RES_KEY_TIP,
	RES_TITEBAR_BG,
	RES_LOGO_NORMAL,
	RES_LOGOBTN_NORMAL,
	RES_LOGOBTN_HOVER,
	RES_LOGOBTN_PRESSED
}
